import type { BaseResponse, userType } from "@/types/common";
import service from "@/utils/request";

export const useLoginAuthApi = (
  data: LoginModel.loginData
): Promise<BaseResponse<string>> => {
  return service({
    url: `/login/auth`,
    method: "POST",
    data,
  });
};

export const useUserInfoApi = (): Promise<BaseResponse<userType>> => {
  return service({
    url: `/userInfo`,
    method: "GET",
  });
};
